Method and apparatus for classifying electronic messages

ABSTRACT

Systems and methods for processing a message are provided. A message may be processed to generate a message summary by removing or replacing certain words, phrases, sentences, punctuation, and the like. Message signatures based upon the message summary may be generated and stored in a signature database, which may be used to identify and/or classify spam messages. Subsequently received messages may be classified by signature and processed based on classification.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation and claims the priority benefit of U.S. patent application Ser. No. 15/074,788 filed Mar. 18, 2016, now U.S. Pat. No. 10,027,611, which is a continuation and claims the priority benefit of U.S. patent application Ser. No. 14/152,812 filed Jan. 10, 2014, now U.S. Pat. No. 9,325,649, which is a continuation and claims the priority benefit of U.S. patent application Ser. No. 13/360,971 filed Jan. 30, 2012, now U.S. Pat. No. 8,688,794, which is a continuation and claims the priority benefit of U.S. patent application Ser. No. 11/903,413 filed Sep. 20, 2007, now U.S. Pat. No. 8,112,486, which is a continuation and claims the priority benefit of U.S. patent application Ser. No. 10/371,977 filed Feb. 20, 2003, now U.S. Pat. No. 7,299,261. The disclosures of the aforementioned applications are incorporated herein by reference.

This application is related to U.S. patent application Ser. No. 10/371,987 filed Feb. 20, 2003. The disclosure of the aforementioned application is incorporated herein by reference.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates generally to message classification. More specifically, a system and method for classifying messages to block junk email messages (spam) are disclosed.

Description of Related Art

People have become increasingly dependent on email for their daily communication. Email is popular because it is fast, easy, and has little incremental cost. Unfortunately, these advantages of email are also exploited by marketers who regularly send out large amounts of unsolicited junk email (also referred to as “spam”). Spam messages are a nuisance for email users. They clog people's email box, waste system resources, often promote distasteful subjects, and sometimes sponsor outright scams.

There have been efforts to block spam using spam-blocking software in a collaborative environment where users contribute to a common spam knowledge base. For privacy and efficiency reasons, the spam-blocking software generally identifies spam messages by using a signature generated based on the content of the message. A relatively straightforward scheme to generate a signature is to first remove leading and trailing blank lines then compute a checksum on the remaining message body. However, spam senders (also referred to as “spammers”) have been able to get around this scheme by embedding variations—often as random strings—in the messages so that the messages sent are not identical and generate different signatures.

Another spam-blocking mechanism is to remove words that are not found in the dictionary as well as leading and trailing blank lines, and then compute the checksum on the remaining message body. However, spammers have been able to circumvent this scheme by adding random dictionary words in the text. These superfluous words are sometimes added as white text on a white background, so that they are invisible to the readers but nevertheless confusing to the spam-blocking software.

The existing spam-blocking mechanisms have their limitations. Once the spammers learn how the signatures for the messages are generated, they can alter their message generation software to overcome the blocking mechanism. It would be desirable to have a way to identify messages that cannot be easily overcome even if the identification scheme is known. It would also be useful if any antidote to the identification scheme were expensive to implement or would incur significant runtime costs.

SUMMARY OF THE PRESENTLY CLAIMED INVENTION

Systems and methods of the present invention provide for processing e-mail messages. A message may be processed to generate a message summary by removing or replacing certain words, phrases, sentences, punctuation, and the like. For example, redundant words may be removed. Message signatures based upon the message summary may be generated and stored in a signature database, which may be used to identify and/or classify spam messages, Subsequently received messages may be classified using signatures based on message summaries and processed based on classification.

Methods of the present invention may include removing non-useful words from the message or replacing the remaining words with canonical equivalent words. The resulting summary may then be transferred to a signature generation engine. The signature generation engine may generate one or more signatures based on the resulting summary. The signatures may be used to classify subsequently received messages, which may then be processed based on their classification. Some embodiments of the present invention further include storing the signatures in a signature database.

Systems of the present invention may include a signature database, a server, and a mail device comprising a summarization and signature generation module. The summarization and signature generation module generates message summaries from a message and generates one or more message signatures based on the resulting summary. The message signatures may be stored in the signature database and used by the server to identify and classify subsequently received messages. The server is further configured to process the subsequently received messaged based on the classification.

An embodiment of the present invention may include computer storage media that include instructions for processing messages to generate message summaries and message signatures based on the message summary. Further embodiments may include instructions for storing the message summaries in a signature database.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be readily understood by the following detailed description in conjunction with the accompanying drawings, wherein like reference numerals designate like structural elements, and in which:

FIG. 1 is a block diagram illustrating a spam message classification network according to one embodiment of the present invention.

FIG. 2 is a flowchart illustrating how a message is classified, according to one embodiment of the present invention.

FIG. 3 is a flowchart illustrating how a user classifies a message as spam, according to one embodiment of the present invention.

FIG. 4 is a flowchart illustrating the summarization process according to one embodiment of the present invention.

DETAILED DESCRIPTION

It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, or a computer readable medium such as a computer readable storage medium or a computer network wherein program Instructions are sent over optical or electronic communication links. It should be noted that the order of the steps of disclosed processes may be altered within the scope of the invention.

A detailed description of one or more preferred embodiments of the invention is provided below along with accompanying figures that illustrate by way of example the principles of the invention. While the invention is described in connection with such embodiments, it should be understood that the invention is not limited to any embodiment. On the contrary, the scope of the invention is limited only by the appended claims and the invention encompasses numerous alternatives, modifications and equivalents. For the purpose of example, numerous specific details are set forth in the following description in order to provide a thorough understanding of the present invention. The present invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the present invention is not unnecessarily obscured.

An improved system and method for classifying mail messages are disclosed. In one embodiment, the message is processed to construct a summary that transforms information in the message into a condensed canonical form. A set of signatures is generated based on the summary. In some embodiments, the distinguishing properties in the message are extracted also and used in combination with the summary to produce signatures. The signatures for junk messages are stored in a database and used to classify these messages.

FIG. 1 is a block diagram illustrating a spam message classification network according to one embodiment of the present invention. The system allows users in the network to collaborate and build up a knowledge base of known spam messages, and uses this knowledge to block spam messages. A spam message is first sent to a mail device 100. The mail device may be a mail server, a personal computer running a mail client, or any other appropriate device used to receive email messages. A user reads the message and determines whether it is spam.

If the message is determined to be spam, a summarization and signature generation engine 108 on the mail device summarizes the message and generates one or more signatures (also referred to as thumbprints) based on the summarized message. The summarization and signature generation engine may be a separate program or part of the mail-processing program on the mail device. The signature is sent to a spam-blocking server 102, which stores the signature in a database 104. Different types of databases are used in various embodiments, including commercial database products such as Oracle databases, files, or any other appropriate storage that allow data to be stored and retrieved. In some embodiments, the database also keeps track of the number of times a signature has been identified as spam by other users of the system. The database may be located on the spam-blocking server device, on a network accessible by server 102, or on a network accessible by the mail devices. In some embodiments, the database is cached on the mail devices and updated periodically.

When a mail device 106 receives a message, the mail device's summarization and signature generation engine 110 summarizes the message, generates one or more signatures for the message, and sends the signatures along with any other query information to the spam-blocking server. The spam-blocking server looks up the signatures in the database, and replies with information regarding the signatures. The information in the reply helps mail device 106 determine whether the message is spam.

Mail device 106 may be configured to use information from the spam-blocking server to determine whether the message is spam in different ways. For example, the number of times the message was classified by other users as spam may be used. If the number of flags exceeds some preset threshold, the mail device processes the message as spam. The number and types of matching signatures and the effect of one or more matches may also be configured. For example, the message may be considered spam if some of the signatures in the signature set are found in the database or the message may be determined to be spam only if all the signatures are found in the database.

In some embodiments, spam-blocking server 102 acts as a gateway for messages. The server includes a summarization and signature generation engine similar to the engine included in a mail device. Incoming messages are received by the server, which performs summarization and signature generation on the message. The server looks up the signature in the database, and processes the message according to the result of the lookup.

Since spam-blocking software can easily detect identical spam messages, spammers often send out many variations on the same message to avoid detection. They may switch the location of sentences and paragraphs, insert random words, or use different words and phrases. The key information conveyed in these variations of messages, however, stays about the same. The summarization and signature generation engine distills the information in the messages and produces a summary.

During the summarization process, words that are not useful are discarded. Examples of non-useful words include commonly occurring words such as “a”, “an”, “the”, “to” and other selected words that are not considered helpful for the purpose of distinguishing the message (also referred to as stop words), and sentences or passages that spammers insert on purpose.

The remaining words and phrases are replaced with their canonical equivalents . The canonical equivalent of a word or a phrase is an identifier used to represent all synonyms of the word or phrase, which may be a word, a phrase, a value, a letter or any other appropriate representation. Redundant information is then removed, and words are optionally ranked and selected based on their importance. There are many different ways of evaluating the importance of words, such as ranking words based on their probability of occurrence in spam messages, probability of occurrence in natural language, or combinations thereof.

The resulting summary is a condensed, canonical form of a message. Thus, different messages that have the same or equivalent information have the same summary, and can be more easily identified using such a summary. Using a summary to identify and classify messages makes it harder for spammers to alter their message generation scheme to evade detection. It is rather unlikely that messages other than those sent by the same spammer would have the same summary. Therefore, the risk of false classification is reduced.

FIG. 2 is a flowchart illustrating how a message is classified, according to one embodiment of the present invention. First, a message is received (200). The message is processed to produce a summary (202). One or more signatures are generated based on the summary (204), and then looked up in a database (206). If the signatures are not found in the database, then no user has classified the message as spam and the system can proceed to process the message as a normal message, delivering the message or displaying it when appropriate (208). If, however, the signatures are found in the database, then the same message or a message similar to it has been classified as spam. Some appropriate action is taken accordingly (210). In an embodiment where the process takes place on a mail client, the action includes classifying the message as spam and moving it to an appropriate junk folder. In an embodiment where the process takes place on a mail server, the action includes quarantining the message so it is recoverable by the administrator or the user.

Sometimes, a spam message is delivered to the user's inbox because the signature of the message summary is not found in the database. This may happen the first time a particular spam message is sent, when the message is yet to be classified as spam by a sufficient number of users on the network, or when not enough variants of the message have been identified. The user who receives the message can then make a contribution to the database by indicating the message as spam. In one embodiment, the mail client software includes a “junk” button in its user interface. The user can click on this button to indicate that a message is junk. Without further action from the user, the software automatically extracts information from the message, submits the information to the server, and deletes the message from the user's inbox. In some embodiments, the mail client software also updates the user's configurations accordingly, For instance, the software may add the sender's address to a blacklist. The blacklist is a list of addresses used for blocking messages, Once an address is included in the blacklist, future messages from that address are automatically blocked.

FIG. 3 is a flowchart illustrating how a user classifies a message as spam according to one embodiment of the present invention. A spam message is received by the user (300). The user selects the message (302), and indicates that the message is junk by clicking on a junk button or some other appropriate means (304). The summarization and signature generation engine summarizes the message (306), and generates a set of signatures based on the summary (308). The signatures, which are used to identify the message, are submitted to the database (31Q). Thus, matching signatures can be found in the database for messages that have the same summary. In some embodiments, the configuration of the user's mail client software is updated based on the classification (312). For example, the sender's address is added to a blacklist for blocking future messages from the same sender. An action is performed on the message accordingly (314). A variety of actions may be performed, including deleting the message from the user's inbox, rejecting or bouncing the message, quarantining the message, etc.

FIG. 4 is a flowchart illustrating the summarization process according to one embodiment of the present invention. A spell check is performed on the message (400). Incorrectly spelled words are corrected; the ones that are not correctable are discarded. In some embodiments, exceptions are made for items that may not be found in the dictionary for legitimate reasons, such as URLs and email addresses.

After the spell check, extraneous information such as stop words that are not useful for distinguishing the message are removed from the message (402). The summarization and signature generation engine uses a collection of stop words to find words that should be removed from the message. Sometimes, spammers include random sentences and passages such as Shakespearean sonnets in spam messages in attempts to evade detection. Thus, in some embodiments, the engine also includes sentences and passages that are known to be often included by spammers, and uses these well-known sentences and passages to remove extraneous words. Removing extraneous words from the message helps simplify the sentence structure and reduces the number of words to be further processed. In some embodiments, punctuations, tabs, or blank lines are also removed. Steps 400 and 402 are preprocessing steps that put the message into a better form for further processing. Upon the completion of steps 400 and 402, the message has been reduced to a list of corrected words that excludes certain words not useful for distinguishing the message.

The remaining words are looked up in a thesaurus or any other collection that organizes words into groups according to their meanings. Each group includes similar words and phrases, and has a word or phrase that is the canonical equivalent of all the words and phrases in the group. The term “canonical equivalent” means the word or phrase that is selected to represent the group of words where the word or phrase has been found. In some embodiments, the canonical equivalent is not itself a word or phrase but is simply an identifier such as a number or letter that identifies the list where the word or phrase from the message is found. The remaining words in the message are then replaced with their canonical equivalents (404). It should be noted that in different embodiments only words may be looked up or some words may be combined into phrases for lookup. The remainder of this description refers to words only for the purpose of clarity. It should be noted that the same principles apply to phrases and that principles apply whether a canonical word is selected in (404) or an identifier of the word group is selected.

Sometimes, a word has multiple meanings. The canonical equivalent of the word is selected from multiple groups of words using a predefined process. In some embodiments, the canonical equivalent that is most likely to occur in spam messages is selected. For example, the word “flies” has two canonical equivalents according to a thesaurus, “air travel” and “insect.” Since there are many spam messages related to air travel and relatively fewer related to insects, “fly” is more likely to be what is intended by the spammer and is therefore chosen over “insect.” In some embodiments, all the canonical equivalents are added to the list. Using the previous example, both “fly” and “insect” are added to the list. In some embodiments, the meaning that occurs in the language most frequently is chosen.

The canonical equivalent words (or identifiers) are then sorted (406). There are sometimes multiple instances of the same word. Duplicates are removed to make the words unique (408). The importance of the words is evaluated (410), and some of the more important words are chosen (412). It should be noted that steps 406-412 are optional, and some or all of them may be omitted in different embodiments. There are many different ways to evaluate the importance of words. In some embodiments, the importance of words is determined by their probability of occurrence in spam messages. Concepts that typically appear in spam messages are ranked higher. For example, “credit”, “finance”, “sex” are popular spam ideas and thus receive high ranking. In some embodiments, words are ranked based on their probability of occurrence in the language. In some embodiments, a combination of techniques is used. The importance ranking of the words is kept separately in some embodiments, and used to rearrange the list of words in some embodiments. This process produces a summary that includes the resulting words.

The summarization and signature generation engine takes the summary to generate a set of signatures (414). There are many ways to generate the signatures using the summary. In some embodiments, a transform function (such as a secure hash function or a checksum) is applied to the bytes in the summary to produce a single signature. In some embodiments, the transform function is applied to words in the summary to produce a set of signatures including a plurality of signatures. In some embodiments, no transformation is applied to the summary and the signature is set to be the summary.

Sometimes the summary must meet a certain minimum byte requirement to generate the signatures.” In some embodiments, the entire summary or the words in the summary are discarded if they have fewer than a predefined number of bytes. Thus, the probability of signature collision is lowered.

For the purposes of example, a spam message is examined and summarized using the process described in FIG. 4. The original message is as follows:

-   -   “Dear Bob,     -   I am a Nigerian widoew. I have 26 million dollars in a bank in         Nigeria that I need to tran:sfer to an U.S. bank account. Please         send me your bank account number so I can transfer the monney,         and you may keep 1 million dollars for yourself.”

First, the spell check corrects widoew to widow, and monney to money.

After removing the non-essential words, the words that are left are: Bob, Nigerian, widow, 26, million, dollars, bank, Nigeria, need, transfer, U.S., bank, account, send, bank, account, number, transfer, money, keep, 1, million, dollars.

After replacing those words with their canonical equivalents, the new words are: name, third-world country, widow, number, large number, money, bank, first-world country, need, financial transaction, third-world country, bank, account, send; bank, account, number, financial transaction, money, keep, number, large number, money.

The words are sorted, and the new word list is as follows: account, account, bank, bank, bank, financial transaction, financial transaction, first-world country, keep, large number, large number, money, money, money, name, need, number, number, number, send, third-world country, third-world country, widow.

The words are then made unique to form the following list: account, bank, financial transaction, first-world country, keep, large number, money, name, need, number, send, third-world country, widow.

The importance of the words is then evaluated, and the more important words receive greater values. The resulting list shows the ranking values in parentheses: account (15), bank (12), financial transaction (16), first-world country (10), keep (8), large number (13), money (20), name (4), need (9), number (12), send (11), third-world country (12), widow (15). The important words are then chosen. In some embodiments, a predefined number of words with the highest ranking may be chosen. In some embodiments, a variable number of words that meet a certain importance ranking may be chosen. In this embodiment, the ten words that have the highest ,importance ranking are chosen; they are: account, bank, financial transaction, first-world country, large number, money, number, send, third-world country, widow. Generally, messages that are variations on the same theme of a widow conducting financial transaction on bank account between first-world country and third-world country should have similar canonical form. These words are then used to generate one or more signatures. As noted above, instead of words, the list may comprise a set of identifiers in, for example, numerical order, that represent the categories of words or phrases occurring most often in the message. Also, in some embodiments, other criteria are used to select the list including probability of occurrence in a message of a category of words.

Some embodiments of the system employ other summarization techniques, such as the topic specific summarization technique described in MSc in Speech and Language Processing Dissertation: Automatic summarizing based on sentence extraction: A statistical approach by Byron Georgantopoulos and the neural net based technique described in Sumatra: A system for Automatic Summary Generation by D. H. Lie. In some embodiments, the summarization and signature generation engine provides interfaces to utilize a summarization module. The summarization module, which may be provided by a third-party, produces summaries for text inputs.

The summarization technique is sometimes combined with the distinguishing properties identification technique described in United States Patent Application Ser. No. 10/371,987 filed Feb. 20, 2003 and entitled “Using Distinguishing Properties to Classify Messages,” the disclosure of which has been previously incorporated by reference. In one embodiment, the summarization technique is applied to produce one or more signatures, and distinguishing properties such as contact information embedded in the message are identified to produce additional signatures.

The generated signatures are transferred and stored in the database. In one embodiment, the signatures are formatted and transferred using extensible markup language (XML). In some embodiments, the signatures are correlated and the relationships among them are also recorded in the database. For example, if signatures from different messages share a certain signature combination, other messages that include the same signature combination may be classified as spam automatically. In some embodiments, the number of-times each signature has been sent to the database is updated.

Using signatures to identify a message gives the system greater flexibility and allows it to be more expandable. For example, the mail client software may only identify one type of distinguishing property in its first version. In later versions, new types of distinguishing properties are added. The system can be upgraded without requiring changes in the spam-blocking server and the database.

An improved system and method for classifying a message have been disclosed. The message is processed to generate a summary that is a condensed, canonical form of the message. One or more signatures are generated based on the summary. Signatures of spam messages are stored in a database to effectively block spam messages.

Although the foregoing invention has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications may be practiced within the scope of the appended claims. It should be noted that there are many alternative ways of implementing both the process and apparatus of the present invention. Accordingly, the present embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims. 

1. (canceled)
 2. A method for classifying messages, the method comprising: ranking words included in a received message based on a probability of occurrence, the received message addressed to a recipient; removing one or more words from the received message based on the word ranking; replacing the one or more removed words with one or more other words; generating a summary of the received message following replacement of the one or more removed words; classifying the received message as spam based on comparing the summary of the received message with summaries of other messages stored in a database; and preventing the message from being provided to the recipient based on the spam classification.
 3. The method of claim 2, further comprising: identifying one or more useless words in the received message; and deleting the one or more useless words identified in the received message.
 4. The method of claim 2, wherein the summary includes a canonical equivalent for the one or more removed words.
 5. The method of claim 2, wherein the message is quarantined based on the spam classification.
 6. The method of claim 2, wherein the message is deleted based on the spam classification.
 7. The method of claim 2, wherein the summary of the received message includes a signature.
 8. A method for classifying message, the method comprising: receiving a message at a first spam blocking device, the message addressed to a first recipient; generating a summary of the message at the first spam blocking device; sending the summary of the message to a spam blocking server, wherein the message is classified as spam after the summary is sent to the spam blocking server; and preventing the message from being provided to the first recipient based on the spam classification, the prevention occurring at the first spam blocking device.
 9. The method of claim 8, further comprising: receiving a plurality of signatures from the spam blocking server; receiving a second message at the spam blocking device; generating a summary of the second message; classifying the second message as spam based on the generated summary matching at least one of the signatures of the plurality of received signatures; and preventing the second message from being provided to an intended recipient based on the spam classification of the second message.
 10. The method of claim 8, wherein the spam blocking device classifies received messages by comparing signatures against a summary of each of the received messages.
 11. The method of claim 8, wherein generating a summary includes: removing one or more words from the received message based on a ranking of words included in the message; and replacing the one or more removed words with one or more other words.
 12. The method of claim 11, wherein the generation of the summary further includes deleting one or more words identified in the received message without replacing the same.
 13. The method of claim 8, wherein the summary includes a canonical equivalent for at least one of a word or a phrase associated with the message.
 14. The method of claim 8, wherein the message is quarantined based on the spam classification.
 15. The method of claim 8, wherein the message is deleted based on the spam classification.
 16. A non-transitory computer-readable storage medium, the storage-medium having embodied thereon a program executable by a processor to perform a method for classifying message, the method comprising: receiving a message addressed to a first recipient; generating a summary of the message; sending the summary of the message to a spam blocking server, wherein the message is classified as spam after the summary is sent to the spam blocking server; and preventing the message from being provided to the first recipient based on the spam classification.
 17. The non-transitory computer-readable storage medium of claim 16, the program further executable to: receive a plurality of signatures from the spam blocking server; receive a second message; generate a summary of the second message; classify the second message as spam based on the generated summary matching at least one of the signatures of the plurality of received signatures; and prevent the second message from being provided to an intended recipient based on the spam classification of the second message.
 18. The non-transitory computer-readable storage medium of claim 16, wherein received messages are classified by comparing signatures with summaries of received messages.
 19. The non-transitory computer-readable storage medium of claim 16, wherein generating the summary includes: removing one or more words from the received message based on a ranking of words included in the message; and replacing the one or more removed words with one or more other words.
 20. The non-transitory computer-readable storage medium of claim 19, wherein generating the summary further includes deleting one or more words identified in the received message.
 21. The method of claim 16, wherein the summary includes a canonical equivalent for at least one of a word or a phrase associated with the message. 